Implementing User Authentication
Table of Contents
Implementing Log Out
Users may also want to log out. For example, imagine your site had confidential financial information, or other personal information. Enabling log out is easy in Dreamweaver, though users often need to close their browsers in addition to logging out to fully kill the session.
-
Back in Dreamweaver, open secret.asp.
This page already has some text on it about logging out, but it is not yet functional.
-
Drag to select the words log out. Add a User Authentication > Log Out User server behavior.
Figure 12. The access denied page in the browser
The Log Out User dialog box opens.
-
In the Log Out User dialog box, verify that Link Clicked “Log Out” is selected in the Log Out When category. In the When Done Go To field, type logout.asp.
Figure 13. The Log Out User dialog box
Clicking this link redirects the user to logout.asp, and it also removes the current session from the server's memory.
Unfortunately, since browsers often remember (the proper term is “cache”) the contents of recently visited pages, it is often possible for the user to press the Back button and access sensitive content again, even after logging out. Therefore, the user should also close the browser. Logging out and closing the browser ultimately ends the session. A note has been added to this effect on logout.asp.
-
Repeat steps 1-3 with top_secret.asp.
The login framework is now completely functional, from beginning to end. You can add as many pages as you want and restrict them by role as appropriate.